package cn.kepu.elearning.common;

/**
 * 统一返回状态
 *
 * @author Endy
 * @create 2019-12-03 下午7:55
 **/
public enum ResultCode {

    CUSTOM_ERROR("100", "自定义错误消息"),
    TOKEN_TIMEOUT("110", "TOKEN过期"),
    SUCCESS("200", "成功"),
    INVALID_AUTHCODE("401", "权限不足"),
    SYS_ERROR("402", "系统错误"),
    PARAMS_ERROR("403", "参数错误 "),
    NOT_SUPPORTED("410", "提交内容不合法"),
    TOO_FREQUENT("445", "太频繁的调用"),
    LIC_ERROR("466", "授权错误"),
    USER_LOGIN_ERROR("471", "账号或密码错误"),
    ENCRYPTION_ERROR("490", "密钥加密错误"),
    UNKNOWN_ERROR("499", "未知错误"),
    EXCEPTION("500", "发生异常");

    private String val;
    private String msg;

    ResultCode(String value, String msg) {
        this.val = value;
        this.msg = msg;
    }

    public String val() {
        return this.val;
    }

    public String msg() {
        return this.msg;
    }
}
